cc.Class({
    extends: cc.Component,

    properties: {
        icon: cc.Sprite,
        title: cc.Label,
        desc: cc.Label,
        price: cc.Label,
    },

    onLoad () {

    },

    init(data) {
        this.title.string = data.gameAmount;
        this.desc.string = data.label;
        this.price.string = data.amount;
        this.icon.loadImage(data.appIcon);
        this.price.node.parent.on('click', () => cc.Proxy.gameCharge(data));
        var d = {
            title: data.gameAmount,
            desc: data.label,
            icon: data.appIcon,
            priceBuy: data.amount
        }
        this.icon.node.on('click', () => cc.Popup.show('public/ShopInfoPop', pop => pop.init(d)));
    }
});
